package fun.tan90.consumer;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * 死信队列消费者
 */
@Slf4j
@Component
@RocketMQMessageListener(topic = "%DLQ%rocketmq_study_2_group", consumerGroup = "rocketmq_study_2_dead_group", selectorExpression = "*")
public class RocketMqStudy1DlqConsumer implements RocketMQListener<String> {

    @Override
    public void onMessage(String msg) {
        log.info(msg);
    }

}
